/*
 Navicat Premium Data Transfer

 Source Server         : db_beta
 Source Server Type    : MySQL
 Source Server Version : 50620
 Source Host           : 10.10.164.107
 Source Database       : axdoc_account

 Target Server Type    : MySQL
 Target Server Version : 50620
 File Encoding         : utf-8

 Date: 07/20/2017 15:03:16 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `doctor_balance_sub_account`
-- ----------------------------
DROP TABLE IF EXISTS `doctor_balance_sub_account`;
CREATE TABLE `doctor_balance_sub_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) NOT NULL COMMENT '关联主账户',
  `pay_password` varchar(64) DEFAULT NULL COMMENT '支付密码',
  `is_allowed_pay` int(11) NOT NULL DEFAULT '1' COMMENT '是否允许支付：0不可以/1可以',
  `is_allowed_recharge` int(11) NOT NULL DEFAULT '1' COMMENT '是否允许充值：0不允许/1允许',
  `is_allowed_withdrawal` int(11) NOT NULL DEFAULT '1' COMMENT '是否允许提现：0不允许/1允许',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态：0冻结/1激活',
  `balance` int(11) NOT NULL DEFAULT '0' COMMENT '总余额',
  `withdrawal_balance_can` int(11) NOT NULL DEFAULT '0' COMMENT '可提现金额',
  `withdrawal_balance_wait` int(11) NOT NULL DEFAULT '0' COMMENT '提现中金额',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `docid` varchar(64) NOT NULL COMMENT '冗余字段docid',
  `forzen_balance` int(11) NOT NULL DEFAULT '0' COMMENT '冻结金额',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`) USING BTREE,
  KEY `m_account_id` (`m_account_id`) USING BTREE,
  KEY `docid` (`docid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17401 DEFAULT CHARSET=utf8mb4 COMMENT='余额子账户';

-- ----------------------------
--  Table structure for `doctor_balance_sub_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `doctor_balance_sub_account_records`;
CREATE TABLE `doctor_balance_sub_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(64) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(1000) NOT NULL COMMENT '业务订单号',
  `change_amount` int(11) NOT NULL DEFAULT '0' COMMENT '变动金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `trx_code` varchar(64) NOT NULL COMMENT '1001/1002/1003/1004/1005/1006/1007/1008',
  `trx_desc` varchar(64) DEFAULT NULL COMMENT '充值/付款/退款/提现/作废/风控/冻结/解冻',
  `biz_code` varchar(64) DEFAULT NULL COMMENT '业务code 00/01/……13 ',
  `biz_desc` varchar(256) DEFAULT NULL COMMENT '业务描述 打赏/讲堂/问答',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `docid` varchar(64) NOT NULL COMMENT '冗余字段docid',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  `biz_type` int(11) DEFAULT NULL COMMENT '业务类型：1:绑定收入(扫码) 2:注册收入 3:问诊收入 4:患者打赏 5:预约咨询 6:补偿 7:邀请 8:活动9:电话咨询10:保证金11:一问一答提问业务12:一问一答偷看答案业务15:一问一答偷看业务扩展（看N补1)17:女王预约收入补贴18:女王出诊固定收入19:女王线下收入ACTION',
  `income_id` varchar(64) DEFAULT NULL COMMENT 'income_id',
  `detail_id` varchar(64) DEFAULT NULL COMMENT '详情id',
  `detail_type` int(11) DEFAULT NULL COMMENT '详情类型:1医生收入2平台补贴',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=90727 DEFAULT CHARSET=utf8mb4 COMMENT='余额子账户流水';

-- ----------------------------
--  Table structure for `doctor_account`
-- ----------------------------
DROP TABLE IF EXISTS `doctor_account`;
CREATE TABLE `doctor_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `docid` varchar(64) NOT NULL COMMENT '医生id',
  `account_type` int(11) NOT NULL DEFAULT '1' COMMENT '账户类型：1个人/0团体',
  `p_no` varchar(64) DEFAULT NULL COMMENT '父编号',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`) USING BTREE,
  UNIQUE KEY `docid` (`docid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17401 DEFAULT CHARSET=utf8mb4 COMMENT='医生账户';

-- ----------------------------
--  Table structure for `mq_records`
-- ----------------------------
DROP TABLE IF EXISTS `mq_records`;
CREATE TABLE `mq_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `msg_type` varchar(32) NOT NULL COMMENT '消息类型',
  `msg_value` varchar(512) NOT NULL COMMENT '消息内容',
  `hash_code` bigint(20) NOT NULL COMMENT 'hash值',
  `state` tinyint(1) NOT NULL COMMENT '状态：0未消费/1已消费',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `msg_from` varchar(32) DEFAULT NULL,
  `unique_id` varchar(64) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_hash_code` (`hash_code`)
) ENGINE=InnoDB AUTO_INCREMENT=512 DEFAULT CHARSET=utf8mb4 COMMENT='消息记录表';

-- ----------------------------
--  Table structure for `patient_activity_sub_account`
-- ----------------------------
DROP TABLE IF EXISTS `patient_activity_sub_account`;
CREATE TABLE `patient_activity_sub_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) NOT NULL COMMENT '关联主账户',
  `activity_number` int(11) NOT NULL DEFAULT '0' COMMENT '活动次数',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态：0冻结/1激活',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  PRIMARY KEY (`id`),
  KEY `m_account_id` (`m_account_id`) USING BTREE,
  KEY `cid` (`cid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6425 DEFAULT CHARSET=utf8mb4 COMMENT='活动子账户';

-- ----------------------------
--  Table structure for `patient_activity_sub_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `patient_activity_sub_account_records`;
CREATE TABLE `patient_activity_sub_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(64) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(64) NOT NULL COMMENT '业务订单号',
  `activity_id` varchar(64) NOT NULL COMMENT '活动id',
  `activity_amount` int(11) NOT NULL DEFAULT '0' COMMENT '活动金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `uid` varchar(64) NOT NULL COMMENT '用户id',
  `channel_id` varchar(64) NOT NULL COMMENT '渠道id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='活动子账户流水';

-- ----------------------------
--  Table structure for `patient_balance_sub_account`
-- ----------------------------
DROP TABLE IF EXISTS `patient_balance_sub_account`;
CREATE TABLE `patient_balance_sub_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) NOT NULL COMMENT '关联主账户',
  `pay_password` varchar(64) DEFAULT NULL COMMENT '支付密码',
  `is_allowed_pay` int(11) NOT NULL DEFAULT '1' COMMENT '是否允许支付：0不可以/1可以',
  `is_allowed_recharge` int(11) NOT NULL DEFAULT '1' COMMENT '是否允许充值：0不允许/1允许',
  `is_allowed_withdrawal` int(11) NOT NULL DEFAULT '0' COMMENT '是否允许提现：0不允许/1允许',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态：0冻结/1激活',
  `balance` int(11) NOT NULL DEFAULT '0' COMMENT '总余额',
  `withdrawal_balance_can` int(11) NOT NULL DEFAULT '0' COMMENT '可提现金额',
  `withdrawal_balance_wait` int(11) NOT NULL DEFAULT '0' COMMENT '提现中金额',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  `forzen_balance` int(11) NOT NULL DEFAULT '0' COMMENT '冻结金额',
  PRIMARY KEY (`id`),
  KEY `m_account_id` (`m_account_id`) USING BTREE,
  KEY `cid` (`cid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6425 DEFAULT CHARSET=utf8mb4 COMMENT='余额子账户';

-- ----------------------------
--  Table structure for `patient_balance_sub_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `patient_balance_sub_account_records`;
CREATE TABLE `patient_balance_sub_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(64) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(64) NOT NULL COMMENT '业务订单号',
  `change_amount` int(11) NOT NULL DEFAULT '0' COMMENT '变动金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `trx_code` varchar(64) NOT NULL COMMENT '1001/1002/1003/1004/1005/1006/1007/1008',
  `trx_desc` varchar(64) DEFAULT NULL COMMENT '充值/付款/退款/提现/作废/风控/冻结/解冻',
  `biz_code` varchar(64) DEFAULT NULL COMMENT '业务code 00/01/……13 ',
  `biz_desc` varchar(64) DEFAULT NULL COMMENT '业务描述 打赏/讲堂/问答',
  `uid` varchar(64) NOT NULL COMMENT '用户id',
  `channel_id` varchar(64) NOT NULL COMMENT '渠道id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10835 DEFAULT CHARSET=utf8mb4 COMMENT='余额子账户流水';

-- ----------------------------
--  Table structure for `patient_coupon_sub_account`
-- ----------------------------
DROP TABLE IF EXISTS `patient_coupon_sub_account`;
CREATE TABLE `patient_coupon_sub_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) NOT NULL COMMENT '关联主账户',
  `coupon_number` int(11) DEFAULT NULL COMMENT '券总量',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态：0冻结/1激活',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  PRIMARY KEY (`id`),
  KEY `m_account_id` (`m_account_id`) USING BTREE,
  KEY `cid` (`cid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6425 DEFAULT CHARSET=utf8mb4 COMMENT='券子账户';

-- ----------------------------
--  Table structure for `patient_coupon_sub_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `patient_coupon_sub_account_records`;
CREATE TABLE `patient_coupon_sub_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(64) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(64) NOT NULL COMMENT '业务订单号',
  `coupon_id` varchar(64) NOT NULL COMMENT '券id',
  `coupon_amount` int(11) NOT NULL DEFAULT '0' COMMENT '券金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `uid` varchar(64) NOT NULL COMMENT '用户id',
  `channel_id` varchar(64) NOT NULL COMMENT '渠道id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6943 DEFAULT CHARSET=utf8mb4 COMMENT='券子账户流水';

-- ----------------------------
--  Table structure for `patient_vip_sub_account`
-- ----------------------------
DROP TABLE IF EXISTS `patient_vip_sub_account`;
CREATE TABLE `patient_vip_sub_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) NOT NULL COMMENT '关联主账户',
  `service_number` int(11) NOT NULL DEFAULT '0' COMMENT '服务次数',
  `service_id` varchar(64) DEFAULT NULL COMMENT '服务id',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '状态：0未激活/1激活',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  PRIMARY KEY (`id`),
  KEY `m_account_id` (`m_account_id`) USING BTREE,
  KEY `cid` (`cid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6425 DEFAULT CHARSET=utf8mb4 COMMENT='vip子账户';

-- ----------------------------
--  Table structure for `patient_vip_sub_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `patient_vip_sub_account_records`;
CREATE TABLE `patient_vip_sub_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(64) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(64) NOT NULL COMMENT '业务订单号',
  `service_id` varchar(64) NOT NULL COMMENT 'vip服务id',
  `service_amount` int(11) NOT NULL DEFAULT '0' COMMENT '服务金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `uid` varchar(64) NOT NULL COMMENT '用户id',
  `channel_id` varchar(64) NOT NULL COMMENT '渠道id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `cid` varchar(64) NOT NULL COMMENT '冗余字段cid',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='vip子账户流水';

-- ----------------------------
--  Table structure for `patient_account`
-- ----------------------------
DROP TABLE IF EXISTS `patient_account`;
CREATE TABLE `patient_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `cid` varchar(64) NOT NULL COMMENT '账号id',
  `account_type` int(11) NOT NULL DEFAULT '1' COMMENT '账户类型：1个人/0团体',
  `p_no` varchar(64) DEFAULT NULL COMMENT '父编号',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`) USING BTREE,
  UNIQUE KEY `cid` (`cid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6428 DEFAULT CHARSET=utf8mb4 COMMENT='患者账户';

-- ----------------------------
--  Table structure for `platform_account`
-- ----------------------------
DROP TABLE IF EXISTS `platform_account`;
CREATE TABLE `platform_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `balance` int(11) NOT NULL COMMENT '平台总余额',
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='平台账户';

-- ----------------------------
--  Table structure for `platform_account_records`
-- ----------------------------
DROP TABLE IF EXISTS `platform_account_records`;
CREATE TABLE `platform_account_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '关联账户编号',
  `trade_no` varchar(512) DEFAULT NULL COMMENT '平台支付订单号',
  `trx_no` varchar(64) DEFAULT NULL COMMENT '微信支付流水号',
  `biz_no` varchar(1000) NOT NULL COMMENT '业务订单号',
  `change_amount` int(11) NOT NULL DEFAULT '0' COMMENT '变动金额',
  `change_direction` int(11) NOT NULL COMMENT '变动方向：0加/1减',
  `type` int(11) NOT NULL COMMENT '1金额/2券/3vip服务/4活动',
  `coupon_id` varchar(64) DEFAULT NULL COMMENT '券id',
  `vip_service_id` varchar(64) DEFAULT NULL COMMENT 'vip服务id',
  `activity_id` varchar(64) DEFAULT NULL COMMENT '活动id',
  `trx_code` varchar(64) NOT NULL COMMENT '1001/1002/1003/1004/1005/1006',
  `trx_desc` varchar(64) DEFAULT NULL COMMENT '充值/付款/退款/提现/作废/风控',
  `biz_code` varchar(64) DEFAULT NULL COMMENT '业务code 00/01/……13 ',
  `biz_desc` varchar(64) DEFAULT NULL COMMENT '业务描述 打赏/讲堂/问答',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `recorded_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入账时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98492 DEFAULT CHARSET=utf8mb4 COMMENT='平台账户流水';

-- ----------------------------
--  Table structure for `account_frozen_records`
-- ----------------------------
DROP TABLE IF EXISTS `account_frozen_records`;
CREATE TABLE `account_frozen_records` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_id` varchar(64) NOT NULL COMMENT '账户编号',
  `m_account_id` varchar(64) DEFAULT NULL COMMENT '主账户',
  `type` int(11) NOT NULL COMMENT '类型：1金额/2券/3vip服务/4活动',
  `m_type` int(11) NOT NULL COMMENT '类型：0患者/1医生',
  `operator_type` int(11) NOT NULL COMMENT '操作类型：0冻结/1激活',
  `comments` text COMMENT '描述',
  `operator_id` varchar(64) DEFAULT NULL COMMENT '操作员id',
  `operator_name` varchar(64) DEFAULT NULL COMMENT '操作员姓名',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='账户冻结记录';

BEGIN;
INSERT INTO `platform_account` VALUES ('1', '88888888', '2017-07-19 19:44:40', '2017-07-19 19:49:32', '0');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
